package com.zcz.umengpush.pojo;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import java.util.Date;

@Data
@Table(name = ("PUSH_MSG"))
public class PushMsg {
	@Column(name="id")
	private String id;
	/**
	 * 所推送主键     用于客户端接收到消息后的跳转
	 */
	@Column(name="objectid")
	private String objectId;
	/**
	 * 推送消息的类型
	 */
	@Column(name="objecttype")
	private Integer objectType;
	/**
	 * 推送标题
	 */
	@Column(name="title")
	private String title;
	/**
	 * 推送内容
	 */
	@Column(name="content")
	private String content;
	/**
	 * 设备类型   0 Android，1 iOS
	 */
	@Column(name="devicetype")
	private Integer deviceType;
	/**
	 * TokenId
	 */
	@Column(name="tokenid")
	private String tokenId;
	/**
	 * 用户类型    0家长1教师
	 */
	@Column(name="usertype")
	private Integer userType;
	/**
	 * 添加时间
	 */
	@Column(name="adddate")
	private Date addDate;
	/**
	 * 是否推送   0未推送1推送成功2推送失败
	 */
	@Column(name="ispush")
	private Integer isPush;
	/**
	 * 推送预约时间   以此字段作为是否推送的时间判断
	 */
	@Column(name="pushdate")
	private Date pushDate;
	/**
	 * 分组Id   同一次触发产生的推送信息作为一个批次
	 */
	@Column(name="groupid")
	private String groupId;
	/**
	 * 推送完成时间
	 */
	@Column(name="pushcompletedate")
	private Date pushCompleteDate;

	/**
	 * 重试次数
	 */
	@Column(name="retrynum")
	private Integer retrynum;

	private String tokens;
	private String ids;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getObjectId() {
		return objectId;
	}

	public void setObjectId(String objectId) {
		this.objectId = objectId;
	}

	public Integer getObjectType() {
		return objectType;
	}

	public void setObjectType(Integer objectType) {
		this.objectType = objectType;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getDeviceType() {
		return deviceType;
	}

	public void setDeviceType(Integer deviceType) {
		this.deviceType = deviceType;
	}

	public String getTokenId() {
		return tokenId;
	}

	public void setTokenId(String tokenId) {
		this.tokenId = tokenId;
	}

	public Integer getUserType() {
		return userType;
	}

	public void setUserType(Integer userType) {
		this.userType = userType;
	}

	public Date getAddDate() {
		return addDate;
	}

	public void setAddDate(Date addDate) {
		this.addDate = addDate;
	}

	public Integer getIsPush() {
		return isPush;
	}

	public void setIsPush(Integer isPush) {
		this.isPush = isPush;
	}

	public Date getPushDate() {
		return pushDate;
	}

	public void setPushDate(Date pushDate) {
		this.pushDate = pushDate;
	}

	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public Date getPushCompleteDate() {
		return pushCompleteDate;
	}

	public void setPushCompleteDate(Date pushCompleteDate) {
		this.pushCompleteDate = pushCompleteDate;
	}

	public Integer getRetrynum() {
		return retrynum;
	}

	public void setRetrynum(Integer retrynum) {
		this.retrynum = retrynum;
	}

	public String getTokens() {
		return tokens;
	}

	public void setTokens(String tokens) {
		this.tokens = tokens;
	}

	public String getIds() {
		return ids;
	}

	public void setIds(String ids) {
		this.ids = ids;
	}

	@Override
	public String toString() {
		return "PushMsg{" +
				"id='" + id + '\'' +
				", objectId='" + objectId + '\'' +
				", objectType=" + objectType +
				", title='" + title + '\'' +
				", content='" + content + '\'' +
				", deviceType=" + deviceType +
				", tokenId='" + tokenId + '\'' +
				", userType=" + userType +
				", addDate=" + addDate +
				", isPush=" + isPush +
				", pushDate=" + pushDate +
				", groupId='" + groupId + '\'' +
				", pushCompleteDate=" + pushCompleteDate +
				", retrynum=" + retrynum +
				", tokens='" + tokens + '\'' +
				", ids='" + ids + '\'' +
				'}';
	}
}
